<admintpl file="header" />


<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('CostClaim/index')}">费用索赔报审表管理</a></li>
            <if condition="($Role eq 2) AND ($userrole['role'] eq 5)">
            <li><a href="{:U('CostClaim/add')}">新增费用索赔报审</a></li>
            </if>
            <li class="active"><a href="{:U('CostClaim/view_edit', array('id'=>I('request.id/s','')))}">查看费用索赔报审</a></li>
        </ul>  
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">

                        <div class="panel-body">
                            <form method="post" class="form-horizontal " action="{:U('CostClaim/audit_post')}">
                                <input type="hidden" name="table_id" value="{$result.id}" />
                                <input type="hidden" name="audit_level" value="{$result.audit_level}" />
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <h3>费用索赔报审表</h3>
                                        <hr />
                                    </div>
                                    <div class="col-md-12">
                                        <p class="tg-to"><label>工程名称:</label><input type="text" class="input-xt input-deptname"  disabled value="{$job_name}" readonly /></p>
                                        <p class="pull-right tg-serialnum"><label>编号:</label><input class="input-xt" name="code" value="{$result.code}" readonly /></p>
                                    </div>
                                </div>

                                <table class="table table-bordered">
                                    <tr>
                                        <td style="border-right:none !important;" class="formcontent">
                                            <p>
                                                <label>致：<input type="text" class="input-xt input-deptname"  name="supervisory_department" readonly value="浙江泛华工程监理有限公司"/>（项目监理机构）:</label>
                                            </p>
                                            <p class="indent20">
                                                根据施工合同<input type="text" class="input-xt" name="" value="{$result.contract_items}" required/>条款，由于<input type="text" class="input-xt" name="" required value="{$result.reasons}"/>的原因，我方申请索赔金额（大写）<input type="text" class="input-xt input-longname" name="claim_amount" required value="{$result.claim_amount}"/>,请予批准。
                                            </p>
                                            <p class="indent20">
                                                索赔理由：
                                                <textarea style="height:100px; width:100%; margin-left: 15px" readonly>{$result.main_content}</textarea>
                                            </p>
                                            <p></p>
                                            <p class="indent20">
                                                附件
                                                <div class="controls" style="margin-left: 20px">
                                                      <ol>
                                                        <if condition="$result['audit_level'] eq 1">
                                                            <li>
                                                                <span style="width:200px !important;">索赔金额计算</span>
                                                                  <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachement_1" style="padding: 6px;margin-left:15px; margin-bottom: 15px; line-height: 0.7em;">上传</a>
                                                                  <span class="controls" style="margin-left:10px;">   
                                                                      <input type="hidden" name="attachement_1" value="{$result.attachement_1}">    
                                                                      <input type="hidden" name="attachement_1_name" value="{$result.attachement_1_name}">    
                                                                    {$result.attachement_1_name}
                                                                  </span>
                                                              </li>
                                                              <li>
                                                                <span style="width:200px !important;">证明材料</span>
                                                                  <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachement_2" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                                  <span class="controls" style="margin-left:10px;">   
                                                                      <input type="hidden" name="attachement_2" value="{$result.attachement_2}">    
                                                                      <input type="hidden" name="attachement_2_name" value="{$result.attachement_2_name}">    
																		{$result.attachement_2_name}
                                                                  </span>
                                                              </li>
                                                          <else />
                                                              <li>索赔金额计算<br />
                                                                  <a href="javascript:void(0);" class="fileDownload" path="{$result.attachement_1}" name="{$result.attachement_1_name}">{$result.attachement_1_name}</a>
                                                              </li>
                                                              <li>证明材料<br />
                                                                  <a href="javascript:void(0);" class="fileDownload" path="{$result.attachement_2}" name="{$result.attachement_2_name}">{$result.attachement_2_name}</a>
                                                              </li>
                                                          </if>
                                                      </ol>
                                                </div>
                                            </p>
                                            <div class="signature signaturetop0">
                                                <p>
                                                    施工项目经理部（盖章）
                                                </p>
                                                <p>
                                                    项目经理（签字)
                                                </p>
                                            </div>
                                            <p class="signature-date">
                                                {$result.publish_time|substr=0,4}&nbsp;年&nbsp;{$result.publish_time|substr=5,2}月&nbsp;{$result.publish_time|substr=8,2}日
                                            </p>  
                                        </td>
                                    </tr>
                                    
                                    <if condition="$audit[3] AND $result['audit_level'] egt '5'">
                                    <tr>
                                        <td colspan="4">
                                            <label>审查意见：</label>
                                            <p class="indent20">
                                                <div class="controls" style="margin-left: 20px">
                                                    <p><input name="audit_status1" type="radio"  disabled="disabled" <if condition="$audit[3][0]['audit_status'] eq '2'">checked</if> value="2" /> 不同意此项索赔。</p>
                                                    <p><input  disabled="disabled" name="audit_status1" type="radio" <if condition="$audit[3][0]['audit_status'] eq '1'">checked</if> value="1" /> 同意此项索赔，索赔金额为（大写）<input type="text" class="input-xt input-longname" name="amount_in_words" readonly  value="{$result.claim_amount}" />。</p>
                                                    <p>
                                                       同意/不同意索赔的理由：
                                                        <textarea style="height:100px; width:100%" readonly>{$audit.3.audit_reason}</textarea>
                                                    </p>
                                                    <p>
                                                        附件
                                                        <!-- -->
                                                        <div class="controls" style="margin-left: 20px">
                                                            <ol>
                                                                <if condition="$audit[3] AND $result['audit_level'] gt 3">
                                                                    <li>
                                                                        <span style="width:200px !important;">索赔审查报告
                                                                        </span>
                                                                        <if condition="$result['audit_level'] gt 3">
                                                                          <!-- <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachement_3" style="padding: 6px;margin-left:15px; margin-bottom: 15px; line-height: 0.7em;">上传</a> -->
                                                                          <span class="controls" style="margin-left:10px;">   
                                                                              <input type="hidden" name="attachement_3" value="{$result.attachement_3}">    
                                                                              <input type="hidden" name="attachement_3_name" value="{$result.attachement_3_name}">
                                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachement_3}" name="{$result.attachement_3_name}">{$result.attachement_3_name}</a>
                                                                          </span>
                                                                      </li>
                                                                  <else />
                                                                      <li>索赔审查报告<br />
                                                                          <a href="javascript:void(0);" class="fileDownload" path="{$result.attachement_3}" name="{$result.attachement_3_name}">{$result.attachement_3_name}</a>
                                                                      </li>
                                                                  </if>
                                                            </ol>
                                                        </div>
                                                        <input type="file" id="upFile" name="upFile" style="display:none" />
                                                    </p>
                                                </div>
                                            </p>
                                            <div class="signature signaturetop0">
                                                <p>项目监理机构（盖章）</p>
                                                <p>总监理工程师（签字、加盖执业印章）</p>
                                                <p class="signature-date">
                                                    <span>年</span>
                                                    <span>月</span>
                                                    <span>日</span>
                                                </p>
                                            </div>
                                        </td>
                                    </tr>
                                    </if>
                                    <if condition="$audit[5] AND $result['audit_level'] egt 7">
                                    <tr>
                                        <td colspan="4">
                                            <label>审批意见：
                                                <if condition="$audit[5][0]['audit_status'] eq 1">&nbsp;同意<else />&nbsp;驳回</if>
                                            </label>
                                            <textarea style="height:50px; width:100%">{$audit.audit_reason}</textarea>
                                            <div class="signature signaturetop0">
                                                <p>建设单位（盖章）</p>
                                                <p>建设单位代表（签字）</p>
                                                <p class="signature-date">
                                                    <span>年</span>
                                                    <span>月</span>
                                                    <span>日</span>
                                                </p>
                                            </div>
                                        </td>
                                    </tr>
                                    </if>
                                    <if condition="$result['audit_status'] eq '2'">
                                        <tr>
                                            <td colspan="4">
                                                <label>审查意见：&nbsp;驳回</label>
                                                <textarea style="height:50px; width:100%" readonly >{$reject.audit_reason}</textarea>
                                            </td>
                                        </tr>
                                    </if>
                                    <if condition="$isAudit eq '2' AND $result['audit_level'] eq 3">
                                    <tr>
                                        <td colspan="4">
                                            <label>审查意见：</label>
                                            <p class="indent20">
                                                <div class="controls" style="margin-left: 20px">
                                                    <p><input name="audit_status" type="radio" value="2" checked /> 不同意此项索赔。</p>
                                                    <p><input name="audit_status" type="radio" value="1" /> 同意此项索赔，索赔金额为（大写）<input type="text" class="input-xt input-longname" name="amount_in_words" value="{$result.claim_amount}" readonly />。</p>
                                                    <p>
                                                       同意/不同意索赔的理由：
                                                        <textarea style="height:100px; width:100%" name="audit_reason"></textarea>
                                                    </p>
                                                    <p>
                                                        附件
                                                        <!-- <input name="" type="checkbox" /> 索赔审查报告
                                                        <input type="file" id="upFile" name="upFile" style="display:none" /> -->
                                                        <!-- -->
                                                        <div class="controls" style="margin-left: 20px">
                                                            <ol>
                                                                <if condition="$isAudit eq '2' AND $result['audit_level'] eq 3">
                                                                    <li>
                                                                        <span style="width:200px !important;">索赔审查报告</span>
                                                                           <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachement_3" style="padding: 6px;margin-left:15px; margin-bottom: 15px; line-height: 0.7em;">上传</a>
                                                                          <span class="controls" style="margin-left:10px;">   
                                                                              <input type="hidden" name="attachement_3" value="{$result.attachement_3}">    
                                                                              <input type="hidden" name="attachement_3_name" value="{$result.attachement_3_name}">    
                                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachement_3}" name="{$result.attachement_3_name}">{$result.attachement_3_name}</a>
                                                                          </span>
                                                                      </li>
                                                                  <else />
                                                                      <li>索赔审查报告4<br />
                                                                          <a href="javascript:void(0);" class="fileDownload" path="{$result.attachement_3}" name="{$result.attachement_3_name}">{$result.attachement_3_name}</a>
                                                                      </li>
                                                                  </if>
                                                            </ol>
                                                            <input type="file" id="upFile" name="upFile" style="display:none" />
                                                        </div>
                                                    </p>
                                                </div>
                                            </p>
                                        </td>
                                    </tr>
                                    </if>
                                    
                                    <if condition="$isAudit eq '2' AND $result['audit_level'] neq 3">
                                    <tr>
                                        <td colspan="4">
                                            <label>审批意见：
                                                <label style="width:50px;"><input type="radio" name="audit_status" value="1" checked />&nbsp;同意</label>
                                                <label style="width:50px;"><input type="radio" name="audit_status" value="2" />&nbsp;驳回</label>
                                            </label>
                                            <textarea style="height:50px; width:100%" name="audit_reason">{$audit.audit_reason}</textarea>
                                        </td>
                                    </tr>
                                    </if>
                                </table>
                                <p class="text-muted tg-note">
                                    <small>注：本表一式三份，项目监理机构、建设单位、施工单位各一份。</small>
                                </p>
                                <div class="form-actions">
                                    <if condition="$isAudit eq '2'">
                                        <a class="btn btn-primary clickBtn" href="javascript:void(0);">{:L('SAVE')}</a>
                                    </if>
                                    <if condition="$result['audit_status'] eq 3">
                                        <a class="btn btn-warning" href="javascript:$.print('#access');">打印</a>
                                    </if>
                                    <a class="btn btn-default" href="{:U('CostClaim/index')}">{:L('BACK')}</a>
                                </div>
                            </form>                   
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        $(document).ready(function(e) {
            window.obj = '';
            // 选择图片
            $(document).on("click", ".upBtn", function(e) {
                window.obj = $(this);
                $("#upFile").click();
            });
            // 文件选择器change事件
            $("#upFile").on("change", function(){
                UploadOneFile("{:U('CostClaim/upload')}", "cost_claim");
            });
        });
    </script>
    <script type="text/javascript" src="__TMPL__Public/assets/js/auditnew.js"></script>
</body>
</html>